package development.bean;

import state.util.Hashtable;

public class Table extends Entity {
  private Game game;
  private Room room;

  private int bid = 0;
  private boolean isLocked;
  private boolean isPlaying;
  private String tableMasterName = "";

  private Hashtable viewUsers = new Hashtable();

  public Table(String id1) {
    super(id1);
  }

  public void addViewUser(User user) {
    viewUsers.put(user.getName(), user);
  }

  public void getViewUser(String username) {
    viewUsers.get(username);
  }

  public void removeViewUser(String username) {
    viewUsers.remove(username);
  }

  public Game getGame() {
    return game;
  }

  public void setGame(Game game1) {
    this.game = game1;
  }

  public Room getRoom() {
    return room;
  }

  public void setRoom(Room room1) {
    this.room = room1;
    this.parent = room1;
    if (room1.getGame() != null) {
      this.game = room1.getGame();
    }
  }

  public int getBid() {
    return bid;
  }

  public void setBid(int bid1) {
    this.bid = bid1;
  }

  public boolean isLocked() {
    return isLocked;
  }

  public void setLocked(boolean isLocked1) {
    this.isLocked = isLocked1;
  }

  public boolean isPlaying() {
    return isPlaying;
  }

  public void setPlaying(boolean isPlaying1) {
    this.isPlaying = isPlaying1;
  }

  public String getTableMasterName() {
    return tableMasterName;
  }

  public void setTableMasterName(String tableMasterName1) {
    this.tableMasterName = tableMasterName1;
  }
}
